package kr.hkit.powerjava.chapter14;

import java.awt.GridLayout;
import java.awt.HeadlessException;

import javax.swing.JButton;
import javax.swing.JFrame;

class MyFrame1 extends JFrame{

	public MyFrame1() throws HeadlessException {
		
		setTitle("GridLayoutTest");
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		
		setLayout(new GridLayout(0,3));
		
		add(new JButton("Button1"));
		add(new JButton("Button2"));
		add(new JButton("Button3"));
		add(new JButton("B4"));
		add(new JButton("b5"));
		
		pack();
		setVisible(true);
	}
	
}

public class GridTest {
	public static void main(String[] args) {
		MyFrame1 f = new MyFrame1();
	}
}
